package com.zzq.service.impl;

import com.zzq.mapper.TendererMapper;
import com.zzq.pojo.Tenderer;
import com.zzq.service.TendererService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TendererServiceImpl implements TendererService{

    @Autowired
    private TendererMapper tendererMapper;

    @Override
    public Tenderer findByTendererName(String username) {
        Tenderer tenderer =tendererMapper.findByTendererName(username);
        return tenderer;
    }

    @Override
    public void register(String username, String password, String companyName, String name,String phone, String address) {
        tendererMapper.add(username,password,companyName,name,phone,address);
    }

    @Override
    public List<Tenderer> list() {
       return tendererMapper.list();
    }

    @Override
    public void deleteTenderer(int id) {
        tendererMapper.deleteTenderer(id);
    }

    @Override
    public void enitTenderer(Tenderer tenderer) {
        tendererMapper.enitTenderer(tenderer);
    }
}
